#ifndef _CTOKENSPLITTER_H_
#define _CTOKENSPLITTER_H_

#include "gameDef.h"

class CTokenSplitter
{
private:
	int m_tokenCount;
	char **m_tokens;

	int isValidChar(char c);
	int skipWhiteSpace(char *s, int p);
	int skipWord(char *s, int p);
	void releaseTokens();
public:
	enum {ERROR_NONE = 0, ERROR_STRING_TOO_LONG};
	enum {MAX_STRING_SIZE = 1024};


	CTokenSplitter();
	CTokenSplitter(char *s);
	~CTokenSplitter();

	int split(char *s);
	int getTokenCount();
	const char *getToken(int p);
};


#endif //_CTOKENSPLITTER_H_